package com.herongo.entity;

import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.springframework.format.annotation.DateTimeFormat;
import org.springframework.stereotype.Component;

import java.util.Date;

@Data
@AllArgsConstructor
@NoArgsConstructor
@Component
public class GoodDetailContent {

    private static final String DATE_FORMAT = "yyyy-MM-dd HH:mm:ss";
    private Integer goodDetailContentId;//流水id
    private Integer goodId;//商品id
    private String goodDetailContentName;//详情表格名
    private String goodDetailContentValue;//详情表格内容
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss", iso = DateTimeFormat.ISO.DATE_TIME)
    @JsonFormat(pattern = DATE_FORMAT,timezone = "GMT+8")
    private Date goodDetailContentCreatAt;//创建时间
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss", iso = DateTimeFormat.ISO.DATE_TIME)
    @JsonFormat(pattern = DATE_FORMAT,timezone = "GMT+8")
    private Date goodDetailContentModifyAt;//修改时间
    private Good goodDetailContent;
    private GoodDetailmg goodDetailmg;

    public GoodDetailContent(Integer goodDetailContentId, Integer goodId, String goodDetailContentName, String goodDetailContentValue, Date goodDetailContentCreatAt, Date goodDetailContentModifyAt) {
        this.goodDetailContentId = goodDetailContentId;
        this.goodId = goodId;
        this.goodDetailContentName = goodDetailContentName;
        this.goodDetailContentValue = goodDetailContentValue;
        this.goodDetailContentCreatAt = goodDetailContentCreatAt;
        this.goodDetailContentModifyAt = goodDetailContentModifyAt;
    }


}
